package com.google.android.location.content;

import android.app.Application;


import com.google.android.location.content.route.RouteManager;

/**
 * MyRouteApplication for keeping global state.
 *
 * @author Andrei
 */
public class MyRouteAppManager extends Application {

  private RouteManager routeDataHub;

  /**
   * Gets the application's RouteManager.
   * 
   * Note: use synchronized to make sure only one instance is created per application.
   */
  public synchronized RouteManager getRouteDataHub() 
  {
    if (routeDataHub == null) 
    {
    	routeDataHub = RouteManager.newInstance(getApplicationContext());
    }
    return routeDataHub;
  }
}
